package org.dl.gjz.menyj.task.listener;

import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.ExecutionListener;
import org.springframework.stereotype.Service;

import java.util.concurrent.TimeUnit;

@Service("noticeCustomer")
public class NoticeCustomerListener implements ExecutionListener {
    @Override
    public void notify(DelegateExecution execution) throws Exception {
        System.out.println("通知客户任务");
        String homeAddress = (String) execution.getVariable("homeAddress");
        TimeUnit.SECONDS.sleep(1);
        System.out.println("维修人员正在赶往客户地址：" + homeAddress);
    }
}
